package com.eastfair.venueservice.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.eastfair.boot.request.PageParams;
import com.eastfair.boot.service.SuperService;
import com.eastfair.core.base.R;
import com.eastfair.venueservice.dto.SpaceAcceptanceDTO;
import com.eastfair.venueservice.dto.SpaceAcceptanceQuery;
import com.eastfair.venueservice.entity.SpaceAcceptance;
import com.eastfair.venueservice.enumeration.SpaceAcceptanceDealResultEnum;
import com.eastfair.venueservice.enumeration.SpaceAcceptanceFinishStatusEnum;
import com.eastfair.venueservice.vo.SpaceAcceptanceVO;

import java.util.List;

/**
 * <p>
 * 业务接口
 * 展厅验收记录
 * </p>
 *
 * @author linan
 * @date 2023-01-06
 */
public interface SpaceAcceptanceService extends SuperService<SpaceAcceptance> {
    /**
     * do转vo
     *
     * @param model
     */
    SpaceAcceptanceVO doToVo(SpaceAcceptance model);

    /**
     * do转vo
     *
     * @param modelList
     */
    List<SpaceAcceptanceVO> doToVos(List<SpaceAcceptance> modelList);


    /**
     * 通用查询
     *
     * @param modelDTO DTO
     * @param ids      主键id集合
     * @return list
     */
    List<SpaceAcceptance> list(SpaceAcceptanceDTO modelDTO, List<Long> ids);

    /**
     * 通用查询
     *
     * @param modelDTO DTO
     * @param ids      主键id集合
     * @return list
     */
    List<SpaceAcceptance> listOfCache(SpaceAcceptanceDTO modelDTO, List<Long> ids);

    /**
     * 保存验收申请
     * @param spaceAcceptanceDTO
     * @return
     */
    Boolean saveSpaceAcceptance(SpaceAcceptanceDTO spaceAcceptanceDTO);

    /**
     * 查询验收申请
     * @param query
     * @return
     */
    IPage<SpaceAcceptanceVO> querySpaceAcceptance(PageParams<SpaceAcceptanceQuery> query);

    /**
     * 获取加班申请详情
     * @param orderNumber
     * @return
     */
    SpaceAcceptance getByAcceptNo(String orderNumber);

    /**
     * 通过单号更新验收申请
     * @param orderNumber
     * @param finished
     * @param spaceAcceptanceDealResultEnum
     */
    void updateFinishStatus(String orderNumber, SpaceAcceptanceFinishStatusEnum finished, SpaceAcceptanceDealResultEnum spaceAcceptanceDealResultEnum);
}
